 package srdb.migration.schema.metadata;
 
 import java.math.BigInteger;
 
 public class Sequence extends DBObject
 {
   private String sequenceName = null;
   private BigInteger minVal = null;
   private BigInteger maxVal = null;
   private BigInteger increment = null;
   private BigInteger lastNumber = null;
   private boolean cycle = false;
   private long cacheSize = 0L;
 
   private boolean caseSensitive = false;
   private String schemaName = null;
 
   public Sequence()
   {
   }
 
   public Sequence(String sequenceName, String schemaName, boolean caseSensitive) {
     this.sequenceName = sequenceName;
     this.schemaName = schemaName;
     this.caseSensitive = caseSensitive;
   }
 
   public void setRange(String MinVal, String MaxVal) {
     this.minVal = new BigInteger(MinVal);
     this.maxVal = new BigInteger(MaxVal);
   }
 
   public void setIncrement(String Increment) {
     this.increment = new BigInteger(Increment);
   }
 
   public void setLastNumber(String LastNumber) {
     this.lastNumber = new BigInteger(LastNumber);
   }
 
   public void setCacheSize(long CacheSize) {
     this.cacheSize = CacheSize;
   }
 
   public void setCycleFlag(String cycleFlag) {
     if (cycleFlag.compareToIgnoreCase("Y") == 0)
       this.cycle = true;
     else
       this.cycle = false;
   }
 
   public BigInteger getMinVal() {
     return this.minVal;
   }
 
   public BigInteger getMaxVal() {
     return this.maxVal;
   }
 
   public BigInteger getIncrement() {
     return this.increment;
   }
 
   public BigInteger getLastNumber() {
     return this.lastNumber;
   }
 
   public long getCacheSize() {
     return this.cacheSize;
   }
 
   public boolean isCycle() {
     return this.cycle;
   }
 
   public String getName() {
     return this.sequenceName;
   }
 
   public String getName(boolean quoted)
   {
     if (this.caseSensitive) {
       return "\"" + this.sequenceName + "\"";
     }
 
     return this.sequenceName;
   }
 
   public boolean isCaseSensitive() {
     return this.caseSensitive;
   }
 
   public DBObject getParent()
   {
     return null;
   }
 
   public String getSchema()
   {
     return this.schemaName;
   }
 }

/* 

 * 
 */